home *** CD-ROM | disk | FTP | other *** search
- /*
- File: GradientImport.r
-
- Copyright (c) 1990, Thomas Knoll.
- Copyright (c) 1993-6, Adobe Systems Incorporated.
- All rights reserved.
-
- Rez source file for GradientImport example.
- */
-
- /***************************************************************/
- /* Defines required by include files */
-
- #define plugInName "GradientImport"
- #define VersionString "4.0"
-
- /***************************************************************/
-
- #if Macintosh
- #include "Types.r"
- #include "SysTypes.r"
- #include "PIGeneral.r"
- #include "PIUtilities.r"
- #include "DialogUtilities.r"
- #endif
-
- #if MSWindows
- #include "PIGeneral.h"
- #include "PIUtilities.r"
- #include "WinDialogUtils.r"
- #endif
-
- #include "PIActions.h"
-
- /***********************************************************/
- /* Version information. */
-
- #define plugInComment "gradientimport example import plug-in"
- #define vendorName "AdobeSDK"
- #define ourSuiteID 'sdK3'
- #define ourClassID 'graD'
- #define ourEventID typeNull // must be this
-
- #define keyMultiImportInfo 'mulK'
- #define classMultiImportStruct 'mulS'
- #define keyOurMode keyMode
- #define keyRows keyHorizontal
- #define keyColumns keyVertical
- #define typeGradientMode 'grmT'
- #define ourBitmapMode 'bitM'
- #define ourGrayscaleMode 'gryS'
- #define ourIndexedColorMode 'indX'
- #define ourRGBColorMode 'rgbC'
-
- #define errHowdWeGetHere 16989
-
- /****************************************************************/
-
- resource 'PiPL' (ResourceID, purgeable)
- {
- {
- Kind { Acquire },
- Name { plugInName "..." },
- Version { (latestAcquireVersion << 16) | latestAcquireSubVersion },
- #if Macintosh
- Code68K { Acquire, $$ID },
- CodePowerPC { 0, 0, "" },
- #else
- CodeWin32X86 { "ENTRYPOINT" },
- #endif
-
- HasTerminology { ourClassID, ourEventID, ResourceID, "" },
- /* class ID, event ID, aete ID, uniqueString */
-
- }
- };
-
- resource 'PiMI' (ResourceID, purgeable)
- {
- latestAcquireVersion,
- latestAcquireSubVersion,
- 0,
- supportsBitmap +
- supportsGrayScale +
- supportsIndexedColor +
- supportsRGBColor,
- ' ', /* No required host */
- {},
- };
-
- /* About resources */
-
- resource StringResource (AboutID, "About Text", purgeable)
- {
- plugInName "\n\n"
- "Version " VersionString " "
- "Release " ReleaseString "\n"
- "Copyright ⌐ 1992-6, Adobe Systems Incorporated.\n"
- "All rights reserved.\n\n"
- "An example import plug-in module for Adobe Photoshop¿."
- };
-
- /* Parameters dialog box */
-
- resource 'DLOG' (ResourceID+1, "UI", purgeable)
- {
- {0, 0, 190, 255},
- movableDBoxProc,
- visible,
- noGoAway,
- 0x0,
- ResourceID+1,
- plugInName
- };
-
- resource 'DITL' (ResourceID+1, "UI", purgeable)
- {
- {
- {15, 180, 35, 240}, Button { enabled, "Import" },
- {45, 180, 65, 240}, Button { enabled, "Done" },
- {10, 90, 26, 135}, EditText { enabled, "" },
- {36, 90, 52, 135}, EditText { enabled, "" },
- {83, 30, 99, 150}, RadioButton { enabled, "Bitmap" },
- {99, 30, 115, 150}, RadioButton { enabled, "Grayscale" },
- {115, 30, 131, 150}, RadioButton { enabled, "Indexed Color" },
- {131, 30, 147, 150}, RadioButton { enabled, "RGB Color" },
- {165, 30, 181, 150}, CheckBox { enabled, "Invert" },
- {10, 40, 26, 85}, StaticText { disabled, "Rows:" },
- {36, 20, 52, 85}, StaticText { disabled, "Columns:" },
- {70, 20, 155, 160}, UserItem { disabled },
- {62, 30, 78, 67}, StaticText { disabled, "Mode" }
- }
- };
-
- /* Scripting resource */
-
- resource 'aete' (ResourceID, purgeable)
- {
- 1, 0, english, roman, /* aete version and language specifiers */
- {
- vendorName, /* vendor suite name */
- "Adobe example plug-ins", /* optional description */
- ourSuiteID, /* suite ID */
- 1, /* suite code, must be 1 */
- 1, /* suite level, must be 1 */
- {}, /* structure for filters */
- { /* non-filter plug-in class here */
- vendorName " gradientImport", /* unique class name */
- ourClassID, /* class ID, must be unique or Suite ID */
- "gradientImport plug-in", /* optional description */
- { /* define inheritance */
- "<Inheritance>", /* must be exactly this */
- keyInherits, /* must be keyInherits */
- classImport, /* parent: Format, Import, Export */
- "parent class import", /* optional description */
- flagsSingleProperty, /* if properties, list below */
-
- "multi-import", /* property name */
- keyMultiImportInfo, /* our key */
- classMultiImportStruct, /* our type */
- "multiple import info structure", /* optional description */
- flagsListProperty
- },
- {}, /* elements (not supported) */
- /* other classes... */
- "import info", /* unique class name */
- classMultiImportStruct, /* class key */
- "class import info", /* optional description */
- {
- "rows", /* property name */
- keyRows, /* rows key */
- typeFloat, /* float, later pin to unixPixels */
- "number of rows", /* optional description */
- flagsSingleProperty, /* properties */
-
- "columns", /* property name */
- keyColumns, /* columns key */
- typeFloat, /* float, later pin to unitPixels */
- "number of columns", /* optional description */
- flagsSingleProperty, /* properties */
-
- "mode", /* property name */
- keyOurMode, /* our mode key */
- typeGradientMode, /* our modes */
- "color mode", /* optional description */
- flagsEnumeratedProperty, /* enumeration. See class below. */
-
- "invert", /* property name */
- keyInvert, /* our key, 'invR' */
- typeBoolean, /* our check box */
- "invert image", /* optional description */
- flagsSingleProperty /* properties */
- },
- {}, /* elements (unsupported) */
- },
- {}, /* comparison ops (not supported) */
- { /* any enumerations */
- typeGradientMode, /* enumeration */
- {
- "bitmap", /* bitmap mode */
- ourBitmapMode, /* 'bitM' */
- "bitmap mode", /* optional description */
-
- "grayscale", /* grayscale mode */
- ourGrayscaleMode, /* 'gryS' */
- "grayscale mode", /* optional description */
-
- "indexed color", /* indexed color mode */
- ourIndexedColorMode, /* 'indX' */
- "indexed color mode", /* optional description */
-
- "rgb color", /* RGB color mode */
- ourRGBColorMode, /* 'rgbC' */
- "rgb color mode" /* optional description */
-
- },
- }
- }
- };
-
-